﻿package mortal.game.view.guildWar
{
    import Message.Public.*;
    import com.mui.controls.*;
    import extend.language.*;
    import mortal.common.global.*;
    import mortal.component.gconst.*;
    import mortal.game.manager.*;
    import mortal.game.view.common.*;

    public class GuildWarFiledCell extends GSprite
    {
        private var _isSelf:Boolean = false;
        private var _name:GTextFiled;
        private var _tower:GTextFiled;
        private var _score:GTextFiled;

        public function GuildWarFiledCell()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._name = UIFactory.gTextField("", 62, 0, 100, 20, this, GlobalStyle.textFormatHuang.setSize(14).setBold(true));
            this._tower = UIFactory.gTextField("", 20, 23, 80, 20, this, GlobalStyle.textFormatHuang.setSize(14).setBold(true));
            this._score = UIFactory.gTextField("", 94, 23, 140, 20, this, GlobalStyle.textFormatHuang.setSize(14).setBold(true));
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._isSelf = false;
            this._name.dispose(param1);
            this._name = null;
            this._tower.dispose(param1);
            this._tower = null;
            this._score.dispose(param1);
            this._score = null;
            super.disposeImpl(param1);
            return;
        }// end function

        public function updateFieldScore(param1:SGuildWarGuildInfo, param2:Boolean = true) : void
        {
            this._isSelf = param2;
            var _loc_3:* = param2 ? (GlobalStyle.colorLv) : (GlobalStyle.colorHong);
            this._name.text = param1.name;
            this._tower.htmlText = Language.getStringByParam(11414, _loc_3, param1.occupy.toString());
            this._score.htmlText = Language.getStringByParam(11415, _loc_3, param1.score.toString(), GameConst.GuildWarMaxScore.toString());
            return;
        }// end function

        public function blink() : void
        {
            var _loc_1:Array = [FilterConst.colorGlowFilter(11252925)];
            EffectManager.glowFilterReg(this, _loc_1, 1, 10, 0, 10);
            return;
        }// end function

    }
}
